#pragma once
#include "Mediator.h"

class Mediator;

class Enemy
{
public:
	Enemy();
	~Enemy();
	void Set_ani(AniVec2 nAni);
	void Change_ani(DWORD nState);
	void Set_move(Move_Vec2 nMove);
	void Set_Pos(D3DXVECTOR2 npos);

	void Set_life(DWORD nlife);
	void Set_item(DWORD item, DWORD cherry);
	void Set_pattern(EventList nlist);

	void Set_Bound(BoundBoxVec nbound);
	BoundBoxVec Get_Bound();
	D3DXVECTOR2 Get_CPos();
	
	DWORD Get_Pitem();
	DWORD Get_Titem();
	DWORD Get_Citem();

	DWORD Damaged(DWORD damage);
	
	virtual void Init(){};
	virtual void Move(){};
	virtual void Update(){};
	virtual void Draw(){};

	virtual DWORD deleteCheck(){return 0;};

protected:
	EventList makePattern;

	Ani_info now_ani;
	Move_info now_move;
	AniVec2 _Ani;
	Move_Vec2 _Move;
	D3DXVECTOR2 pos;

	BoundBoxVec bound;

	DWORD move_count;
	DWORD ani_count;
	DWORD shoot_count;
	DWORD nowAniState1;
	DWORD nowAniState2;
	DWORD nowMoveState1;
	DWORD nowMoveState2;

	DWORD Pitem;
	DWORD Titem;
	DWORD Citem;

	DWORD life;
	DWORD nowlife;

	DWORD live_time;
	DWORD limit_time;

	DWORD now_state;

	Mediator* processor;
};

typedef std::list<Enemy*> EnemyList;